<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>会员登录</title>
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<script src="js/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<!-- 引入自定义css文件 style.css -->
<link rel="stylesheet" href="css/style.css" type="text/css" />

<style>
body {
	margin-top: 20px;
	margin: 0 auto;
}

.carousel-inner .item img {
	width: 100%;
	height: 300px;
}
</style>
</head>

<body>
	<%
		session.setAttribute("acc", session.getAttribute("account"));
	%>
	<c:if test="${empty acc }">
		<%
			session.setAttribute("acc", session.getAttribute("sp"));
		%>
	</c:if>

			<!--
            	时间：2015-12-30
            	描述：菜单栏
            -->
	<div class="container-fluid">
		<div class="col-md-4">
			<img src="img/logo2.png" />
		</div>
		<div class="col-md-5">
			<img src="img/header.png" />
		</div>
		<div class="col-md-3" style="padding-top: 20px">
			<ol class="list-inline">
				<c:if test="${not empty account }">
					<a href="#">当前账户:<c:out value="${account }" /></a>
					<li><a href="login.jsp">退出</a></li>
					<li><a href="shoppingCar">购物车</a></li>
				</c:if>

				<c:if test="${empty account }">
					<li><a href="login.jsp">未登录，请登录</a></li>
					<li><a href="register.jsp">注册</a></li>
				</c:if>
			</ol>
		</div>
	</div>
			<!--
            	时间：2015-12-30
            	描述：导航条
            -->
	<div class="container-fluid">
		<nav class="navbar navbar-inverse">
			<div class="container-fluid">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed"
						data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
						aria-expanded="false">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="index.jsp">首页</a>
				</div>

				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse"
					id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li><a href="#">手机数码<span class="sr-only">(current)</span></a></li>
						<li><a href="#">电脑办公</a></li>
						<li><a href="#">电脑办公</a></li>
						<li><a href="#">电脑办公</a></li>
					</ul>
					<form class="navbar-form navbar-right" role="search">
						<div class="form-group">
							<input type="text" class="form-control" placeholder="Search">
						</div>
						<button type="button" class="btn btn-default">Submit</button>
					</form>

				</div>
				<!-- /.navbar-collapse -->
			</div>
			<!-- /.container-fluid -->
		</nav>
	</div>

	<!--
            	时间：2018-8-3
            	描述：处理需要插入的图片，并设置产品参数
            -->
	<c:set var="a" value="<%=request.getParameter(\"png\")%>" />
	<c:choose>
		<c:when test="${a==2 }">
			<img src="shopImg/2.2.png">
			<c:set var="shopName" value="Apple/Iphone X" />
			<c:set var="price" value="7488.00" />
		</c:when>
		<c:when test="${a==3 }">
			<img src="shopImg/3.3.png">
			<c:set var="shopName" value="Apple/Iphone 5s" />
			<c:set var="price" value="1189.00" />
		</c:when>
		<c:when test="${a==4 }">
			<img src="shopImg/4.4.png">
			<c:set var="shopName" value="honor/荣耀10" />
			<c:set var="price" value="2599.00" />
		</c:when>
		<c:when test="${a==5 }">
			<img src="shopImg/5.5.png">
			<c:set var="shopName" value="Huawei/华为 p20" />
			<c:set var="price" value="3788.00" />
		</c:when>
		<c:when test="${a==6 }">
			<img src="shopImg/6.6.png">
			<c:set var="shopName" value="vivo Y75s" />
			<c:set var="price" value="1098.00" />
		</c:when>
	</c:choose>

	<div class="container">
		<div
			style="border-bottom: 1px solid #faeac7; margin-top: 20px; padding-left: 600px;">
			<!-- 判断账号是否登录，决定是否跳转到购物车 -->
			<c:if test="${not empty account }">
				<!-- 代表账号已经登录 -->
				<form
					action="shoppingCar?shopName=<c:out value="${shopName }"/>
											  &price=<c:out value="${price }"/>"
					method="post">
					购买数量:<input id="quantity" name="number" value="1" maxlength="4"
						size="10" type="text"> <input
						style="background: url('./images/product.gif') no-repeat scroll 0 -600px rgba(0, 0, 0, 0); height: 36px; width: 127px;"
						value="加入购物车" type="submit">
				</form>
			</c:if>

			<c:if test="${empty account }">
				<!-- 代表账号未登录 -->
				<form action="error.jsp" method="post">
					购买数量:<input id="quantity" name="number" value="1" maxlength="4"
						size="10" type="text"> <input
						style="background: url('./images/product.gif') no-repeat scroll 0 -600px rgba(0, 0, 0, 0); height: 36px; width: 127px;"
						value="加入购物车" type="submit">
				</form>
			</c:if>

		</div>
	</div>




	<div style="margin-top: 50px;">
		<img src="./image/footer.jpg" width="100%" height="78" alt="我们的优势"
			title="我们的优势" />
	</div>

	<div style="text-align: center; margin-top: 5px;">
		<ul class="list-inline">
			<li><a>关于我们</a></li>
			<li><a>联系我们</a></li>
			<li><a>招贤纳士</a></li>
			<li><a>法律声明</a></li>
			<li><a>友情链接</a></li>
			<li><a target="_blank">支付方式</a></li>
			<li><a target="_blank">配送方式</a></li>
			<li><a>服务声明</a></li>
			<li><a>广告声明</a></li>
		</ul>
	</div>
	<div style="text-align: center; margin-top: 5px; margin-bottom: 20px;">
		Copyright &copy; 2018-2025 睿峰商城 版权所有</div>

</body>

</html>